Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 5 - Option Management / Option Management Reference
Functions / Determining and Changing Function Values


OTOptionManagement

Determines an endpoint's current or default option values or changes
these values.

C INTERFACE
OSErr OTOptionManagement (EndpointRef ref, TOptMgmt* req, 
                          TOptMgmt* ret);
C++ INTERFACES
OSErr TEndpoint::OptionManagement(TOptMgmt* req, TOptMgmt* ret);
PARAMETERS
ref
The endpoint reference of the endpoint for which you are checking or setting option values.
req
A pointer to an option management structure (page 5-33), which describes the action to be taken by the function and the options affected.
ret
A pointer to an option management structure (page 5-33), which describes the options that were changed or returned by the function and how successful the negotiation process was.
DESCRIPTION
To use the OTOptionManagement function, you must have opened an endpoint using the OTOpenEndpoint or OTAsyncOpenEndpoint functions.

You use the OTOptionManagement function to negotiate, retrieve, or verify an endpoint's protocol options. If the endpoint is in asynchronous mode and you have not installed a notifier function, it is not possible to determine when the function completes.

The action taken by the OTOptionManagement function is determined by the setting of the req->flags field. The following bulleted items describe the different operations that you can perform and the flag settings that you use to specify these operations.

SPECIAL CONSIDERATIONS
While an option management call is outstanding, any other functions that are called for the same endpoint return with a kOTStateChangeErr result.

If the endpoint is in asynchronous mode, the provider might issue the T_OPTIONMGMTCOMPLETE event before the function returns the first time.

COMPLETION EVENTS
T_OPTMGMTCOMPLETE0x20000006The OTOptionManagement function has completed. The cookie parameter of the notifier function points to the ret parameter.
SEE ALSO
Option information is formatted using the TOption structure (page 5-32). For additional information about the format of the options buffers, see "Specifying Option Values" (page 5-18).

For more information about the OTOpenEndpoint and OTAsyncOpenEndpoint, see the reference section of the chapter "Endpoints" in this book.

For additional information about using the T_ALLOPT option, see "Setting Default Values" (page 5-20) and "Obtaining Current and Default Values" (page 5-21).

For more information about creating the buffer referenced by the req->opt.buf field, see the description of the OTCreateOptions function, next.

For information about creating a string referenced by the ret->opt.buf field, see the description of the OTCreateOptionString function (page 5-42).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996